package com.tofacebook.mybatis.model;

import java.util.List;

public class Dept {
    private Integer deptId;
    private String deptName;

    //声明一个属性用于存储员工信息，员工信息是多条记录
    //那么就需要使用集合
    List<Emp> emplist;

    public List<Emp> getEmplist() {
        return emplist;
    }

    public void setEmplist(List<Emp> emplist) {
        this.emplist = emplist;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public Dept(Integer deptId, String deptName) {
        this.deptId = deptId;
        this.deptName = deptName;
    }
    public Dept(String deptName) {
        this.deptName = deptName;
    }
    public Dept() {}

    @Override
    public String toString() {
        return "Dept{" +
                "deptId=" + deptId +
                ", deptName='" + deptName + '\'' +
                ", emplist=" + emplist +
                '}';
    }

}
